<?php
use common\library\comFun;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;

?>
<fieldset class="layui-elem-field layui-field-title" style="">
    <legend>筛选</legend>
    <form class="layui-form layui-form-pane">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">员工名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="member_name" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">去向</label>
                <div class="layui-input-block">
                    <select name="work_class_id">
                        <option value="">全部</option>
                        <? foreach ($workClassList as $key=>$value):?>
                            <option value="<?=$value['works_class_id']?>"  <?php if( !empty($workClassId) && $workClassId==$value['works_class_id']){echo 'selected';}?>  ><?=$value['class_name']?></option>
                        <? endforeach?>
                    </select>
                </div>
            </div>


            <div class="layui-inline">
                <button class="layui-btn" lay-submit="" lay-filter="demo1">查询</button>
            </div>
        </div>
    </form>
</fieldset>

<table class="layui-table">
    <colgroup>
        <col width="150">
        <col width="150">
        <col width="150">
        <col width="150">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>去向</th>
        <th>人员名称</th>
        <th>开始时间</th>
        <th>结束时间</th>
        <th>备注</th>
    </tr>
    </thead>
    <tbody>
    <?php foreach ($list as $data): ?>
        <tr>
            <td><?= $data['work_class_name'] ?></td>
            <td><?= $data['member_name'] ?></td>
            <td>
                <?= date('Y-m-d H:i:s',$data['start_time']) ?>
            </td>
            <td>
                <?= date('Y-m-d H:i:s',$data['end_time']) ?>
            </td>
            <td><?= $data['remark'] ?>
            </td>
        </tr>
    <?php endforeach; ?>
    </tbody>
</table>
<div id="o-page" data-pages="<?= $pageArr['pageTotal'] ?>"></div>
<script>
    layui.use(['form', 'laydate'], function () {
        var form = layui.form(),
            laydate = layui.laydate;
    });
</script>